
<?php
require "Admin/View/admin/adminlogin.php";
$row=$data['cartoons'];
?>
<td><h2><a href="admin.php?c=cartoon&m=regcartoon">动漫添加</a></h2></td>
<center><h2>系统共有动漫(<?php echo count($data['cartoons']); ?>个)</h2></center>
 <form action="admin.php?c=cartoon&m=searchcartoon" method="POST" name="key" id="key" align="right" >
      <table width="90%">
          <td >请输入动漫名称：
          <input name="key" type="text" id="key" >
          <input name="submit" type="submit" value="搜索" /></td></table>
        </form>
<div class="col-md-2"></div>
<div class="col-md-12">
<table class="table table-hover">
<tr>
<th>动漫编号</th>
<th>动漫名称</th>
<th>动漫类型</th>
<th>动漫下载地址</th>
<th>动漫海报</th>
<th>操作</th>
</tr>
<?php
foreach($data['cartoons'] as $row){
	?>
	<tr>
	<td><?php echo $row['cid'];?></td>
	<td><?php echo $row['cartoonname'];?></td>
	<td>
	<?php 
	      switch ($row['tid']) {
	      	case '1':
	      		echo "日本";
	      		break;
	      	case '2':
	      		echo "大陆";
	      		break;
	      	case '3':
	      		echo "欧美";
	      		break;
	      	case '4':
	      		echo "其他";
	      		break;
	      	default:
                echo "未选择类型";
	      		break;
	      };
	?></td>
	<td><?php echo $row['address'];?></td>
	<td><img src="./posters/<?php echo $row['pic'];?>" width="80" height="80"alt="海报" title="<?php echo $row['intro'];?>"></td>
	<td><a href="admin.php?c=cartoon&m=editcartoon&cid=<?php echo $row['cid'];?>">修改</a> 
    <a href="admin.php?c=cartoon&m=delcartoon&cid=<?php echo $row['cid'];?>">删除</a></td>
    </tr>
    <?php
}
    ?>
     </div>
</table>
<?php
//var_dump($data['cartoons']);
?>
</body>
</html>